﻿using System;
delegate int PerformCalc(int x, int y);

class Calculator
{
    public int CalculateSum(int x, int y)
    {
        return x + y;
    }
}

class AlternateCalculator
{
    public int CalculateProduct(int x, int y)
    {
        return x * y;
    }
}

class Program
{
    static void Main(string[] args)
    {
        PerformCalc del = new Calculator().CalculateSum;

        del += new AlternateCalculator().CalculateProduct;

        Delegate[] inlist = del.GetInvocationList();
        foreach (Delegate i in inlist)
        {
            Console.WriteLine("Target:{0}", i.Target);
            Console.WriteLine("Method:{0}", i.Method);
        }

        Console.ReadKey();
    }
}